/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.google.code.netbuilder.dal.providers.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Юрийэ
 */
class JDBCServise {
    public static Connection getConnection() throws SQLException
    {
        Connection conn = null;
        try {
            
            try {
                Class.forName("com.mysql.jdbc.Driver");
                
                conn = DriverManager.getConnection(	"jdbc:mysql://localhost:3306/netbuilder",
                                                    "netbuilder", 
                                                    "netbuilder");
            } catch (SQLException ex) {
               
            } catch (ClassNotFoundException e) {
                    e.printStackTrace();
            }
            
//            InitialContext context = new InitialContext();
//            DataSource ds = (DataSource)context.lookup("jdbc/netbuilder");
//            conn = ds.getConnection();
        
            
        } catch (Exception ex) {
            
        }
        return conn;
    }
}
